A moving picture coding scheme with a high compression rate is ISO/IEC 14496-10 Advanced Video Coding (Non-patent Document 1: ISO/IEC 14496-10 Advanced Video Coding).
A moving picture coding apparatus using the above-described AVC applies coding processing to Macro Blocks (MB's) one by one in each input image frame to generate encoded data, i.e., bit stream. As used herein, an MB refers to a cell of an input image frame divided in a grid-like manner, the cell containing 16×16 luminance pixels and 8×8 Cr—Cb chrominance pixels (FIG. 1). In a case that input data is interlaced, the structure of an image frame is divided into a first field and a second field, and each field serves as an image frame subjected to coding processing.
According to AVC, intra-forecast coding can be applied to a 4×4 unitary block at minimum, which is obtained by subdividing an MB. In intra-forecast coding according to AVC, encoding may be achieved by selecting an intra-forecast mode that is suitable for intra-forecast coding of a current block from among a plurality of intra-forecast modes (candidate intra-forecast modes (c_intra_mode[i] (0≦i≦8))).
FIG. 2 shows an intra-forecast mode selecting apparatus (which will be referred to as a conventional intra-forecast mode selecting apparatus hereinbelow) for selecting an intra-forecast mode for a 4×4 block suitable for intra-forecast coding. The conventional intra-forecast mode selecting apparatus is comprised of a controller P10001, an intra-forecast apparatus P10002, an SATD calculating apparatus P10003, a header cost calculating apparatus P10004, an intra-forecast mode forecasting apparatus P10005, and a selecting apparatus P10006.
The controller P10001 supplies a candidate intra-forecast mode (c_intra_mode[i]) for a 4×4 block of interest to the intra-forecast apparatus P10002 and header cost calculating apparatus P10004.
Referring to FIG. 3, AVC has nine candidate intra-forecast modes. A DC intra-forecast mode (Mode=2) produces a forecasted image with an average value of already-encoded surrounding pixels, while other intra-forecast modes (Mode=2) produce a forecasted image by padding already-encoded surrounding pixels in a specific direction.
The intra-forecast apparatus P10002 produces an intra-forecasted image pred corresponding to the supplied candidate intra-forecast mode c_intra_mode[i] from an already-encoded reconstructed image.
The SATD calculating apparatus P10003 is supplied with a forecast difference diff (EQ. (1)) obtained by subtracting the intra-forecasted image pred from an original image org for the 4×4 block of interest:diff(i,j)=org(i,j)−pred(i,j)  (1)
The SATD calculating apparatus P10003 applies Hadamard transform to the above-described forecast difference diff (EQ. (2)), and calculates for outputting a total sum SATD of the absolute values of the coefficients of Hadamard transform (EQ. (3)).
                    Tdiff        =                                            [                                                                    1                                                        1                                                        1                                                        1                                                                                        1                                                        1                                                                              -                      1                                                                                                  -                      1                                                                                                            1                                                                              -                      1                                                                                                  -                      1                                                                            1                                                                                        1                                                                              -                      1                                                                            1                                                                              -                      1                                                                                  ]                        ⁡                          [                                                                                          diff                      00                                                                                                  diff                      01                                                                                                  diff                      02                                                                                                  diff                      03                                                                                                                                  diff                      10                                                                                                  diff                      11                                                                                                  diff                      12                                                                                                  diff                      13                                                                                                                                  diff                      20                                                                                                  diff                      21                                                                                                  diff                      22                                                                                                  diff                      23                                                                                                                                  diff                      30                                                                                                  diff                      31                                                                                                  diff                      32                                                                                                  diff                      33                                                                                  ]                                ⁢                                                 [                                                                    1                                                        1                                                        1                                                        1                                                                                        1                                                        1                                                                              -                      1                                                                                                  -                      1                                                                                                            1                                                                              -                      1                                                                                                  -                      1                                                                            1                                                                                        1                                                                              -                      1                                                                            1                                                                              -                      1                                                                                  ]                                                          (        2        )                                SATD        =                  0.5          ×                                    ∑                              x                =                0                            3                        ⁢                                          ∑                                  y                  =                  0                                3                            ⁢                                                                Tdiff                  ⁡                                      (                                          x                      ,                      y                                        )                                                                                                                          (        3        )            
On the other hand, the intra-forecast mode forecasting apparatus P10005 forecasts an intra-forecast mode for the 4×4 block of interest from the intra-forecast mode for an already-encoded 4×4 block adjacent thereto, as given by EQ. (4). As used hereinbelow, the intra-forecast mode that is forecasted is represented as a forecasted intra-forecast mode (p_intra_mode).
                              p_intra          ⁢          _mode                =                  {                                                                      D                  ⁢                                                                          ⁢                  C                                                                              if                  ⁢                                                                          ⁢                                      (                                          the                      ⁢                                                                                          ⁢                      block                      ⁢                                                                                          ⁢                      of                      ⁢                                                                                          ⁢                      interest                      ⁢                                                                                          ⁢                      lies                      ⁢                                                                                          ⁢                      at                      ⁢                                                                                          ⁢                      theboundary                      ⁢                                                                                          ⁢                      frames                      ⁢                                                                                          ⁢                      or                      ⁢                                                                                          ⁢                      slices                                        )                                                                                                                        min                  ⁡                                      (                                                                  intra_mode                        ⁢                        _A                                            ,                                              intra_mode                        ⁢                        _B                                                              )                                                                              Otherwise                                                                        (        4        )            
where intra_mode_A designates an intra-forecast mode for a block left adjacent to the block of interest, and intra_mode_B designates an intra-forecast mode for a block upwardly adjacent to the block of interest. Since intra_mode is defined as given in TABLE 1 according to AVC, an intra-frame forecast direction having the smaller number is selected from among adjacent blocks. In coding in the intra-forecast mode according to AVC, if the intra-forecast mode (intra_mode) is the same as the forecasted intra-forecast mode (p_intra_mode), one bit of prev_intra4×4_pred_mode_flag (which will be abbreviated as prev_intra_mode_flag hereinbelow) (a total of one bit) is transmitted; otherwise, one bit of prev_intra_mode_flag and three bits of rem_intra4×4_pred_mode (which will be abbreviated as rem_intra_mode hereinbelow) (a total of four bits) are transmitted (see Non-patent Document 1: ISO/IEC 14496-10 Advanced Video Coding for further information).
TABLE 1Intra-frameforecastintra_modedirection0Vertical (V)1Horizontal (H)2DC3    45°4 −45°5 −22.5°6 −67.5°7   22.5°8−112.5
The forecasted intra-forecast mode (p_intra_mode) is supplied to the header cost calculating apparatus P10004.
When the candidate intra-forecast mode (c_intra_mode[i]) supplied by the controller P10001 is the same as the forecasted intra-forecast mode (p_intra_mode) supplied by the intra-forecast mode forecasting apparatus P10005, the header cost calculating apparatus P10004 outputs an output value of the first cost calculation (EQ. (5)) as a header cost.
                                                        header_cost              =                                                2                                                            (                                              QP                        -                        12                                            )                                        /                    6                                                  ×                                  Bits                  ⁡                                      (                                          prev_intra                      ⁢                      _mode                      ⁢                      _flag                                        )                                                                                                                          =                              2                                                      (                                          QP                      -                      12                                        )                                    /                  6                                                                                        (        5        )            
Otherwise (i.e., when c_intra_mode[i] is not the same as p_intra_mode), the header cost calculating apparatus P10004 outputs an output value of the second cost calculation (EQ. (6)) as a header cost.
                                                        header_cost              =                            ⁢                                                2                                                            (                                              QP                        -                        12                                            )                                        /                    6                                                  ×                                  {                                                            Bits                      ⁡                                              (                                                  prev_intra                          ⁢                          _mode                          ⁢                          _flag                                                )                                                              +                                                                                                                                        ⁢                              Bits                ⁡                                  (                                      rem_intra                    ⁢                    _mode                                    )                                            }                                                                          =                            ⁢                              4                ×                                  2                                                            (                                              QP                        -                        12                                            )                                        /                    16                                                                                                          (        6        )            
where QP designates a quantization parameter of the current MB, and Bits(x) is a function that returns the number of bits of a symbol x.
The selecting apparatus P10006 is input with a sum of the SATD supplied by the SATD calculating apparatus P10003 and the header cost supplied by the header cost calculating apparatus P10004 (EQ. (7)). The sum will be referred to as a cost of a candidate intra-forecast mode.cost=SATD+header_cost  (7)
When the supplied cost is smaller than the minimum cost (min_cost) calculated for the 4×4 block of interest in the past, the selecting apparatus P10006 sets the candidate intra-forecast mode (c_intra_mode[i]) to the intra-forecast mode (intra_mode) for the 4×4 block of interest, and moreover, updates the minimum cost (min_cost) with cost.
The conventional intra-forecast mode selecting apparatus can apply the aforementioned processing to each candidate intra-forecast mode (c_intra_mode[i]) for a 4×4 block of interest one by one to thereby select an intra-forecast mode for the 4×4 block of interest.
It should be noted that the total sum (mb_cost) (EQ. (8)) of the cost for each 4×4 block in an MB is employed for MB-mode decision in the outside.
                    mb_cost        =                              ∑                          iidx              =              0                        15                    ⁢                      cost            ⁡                          (              idx              )                                                          (        8        )            
where idx designates a number corresponding to each 4×4 block within the MB shown in FIG. 1.
The explanation of the prior arts has now been completed.
Non-patent Document 1: ISO/IEC 14496-10 Advanced Video Coding.
Non-patent Document 2: Ryuichi TANIDA, Atsushi SHIMIZU, Kazuto KAMIKURA, and Yoshiyuki YASHIMA, “Verification of the algorithm for suppression of line-shaped noise on H.264/MPEG-4 AVC,” Proceedings of the IEICE General Conference, D-11-38 (2004).